import {message} from 'antd'


export const ShowLoading = (msg='加载中...')=>{
    message.destroy()
    message.open({
        type: 'loading',
        content: msg,
        duration:0,   // 0s 不关闭 你需要手动关闭 
    });
}

export const ShowFail = (msg='失败')=>{
    message.destroy()
    message.open({
        type: 'error',
        content: msg,
    });
}

export const ShowSuccess = (msg='成功')=>{
    message.destroy()
    message.open({
        type: 'success',
        content: msg,
    });
}

export const ShowToast = (msg='')=>{
    message.destroy()
    message.info(msg);
}